import com.hp.hpl.jena.ontology.Individual;
import com.hp.hpl.jena.ontology.ObjectProperty;
import com.hp.hpl.jena.ontology.OntClass;
import com.hp.hpl.jena.ontology.OntModel;
import com.hp.hpl.jena.rdf.model.Statement;


public class UpdateOntModel {
	
	public void runUpdate(OntModel infOntModel){
		
		String ex = MiddlewareForAmI.ex;
		
		Individual infIndividual = infOntModel.getIndividual(ex+"Tao");
		OntClass Restaurant = infOntModel.getOntClass(ex+"Restaurant");
		Individual chineseRestaurant = Restaurant.createIndividual(ex+"ChineseRestaurant");
		Individual frenchRestaurant = infOntModel.getIndividual(ex+"FranceRestaurant");
		Individual classRoom3 = infOntModel.getIndividual(ex+"ClassRoom3");
//		System.out.println(frenchRestaurant.toString());
		ObjectProperty hasLocatedIn = infOntModel.getObjectProperty(ex+"hasLocatedIn");
		ObjectProperty hasTest = infOntModel.createObjectProperty(ex+"hasTest");
		//infIndividual.addProperty(hasLocatedIn,ex+"FranceRestaurant");
		Statement location = infOntModel.createStatement(infIndividual, hasLocatedIn, frenchRestaurant);
		infIndividual.removeProperty(hasLocatedIn,classRoom3);

        infOntModel.add(location);
        
      
		
	}

}
